package testing;

import static org.junit.Assert.*;

import java.util.Arrays;
import java.util.Stack;

import org.junit.Before;
import org.junit.Test;

import escenario.Escenario;

public class TestDisparoNorte {
	Escenario esc = new Escenario();
	private Stack<int[]> expected = new Stack<int[]>();
	
	@Before
	public void setup() {
		esc.iniciarEscenario();
		expected.push(new int[] {0,0,0,0,0,1,1,1,1,0,0,0});
	}	
	
	@Test
	public void test() {
		esc.getGeneradorMisilesEnemigos().generarMisil(200, 50, 90, 5, 90, 180);
		
		try {
			Thread.sleep(5000);
		} catch (InterruptedException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}	
		
		assertEquals(Arrays.toString(expected.pop()), esc.getSistemaBateriaMisiles().getPilaVectorMarcado().pop());

		try {
			Thread.sleep(18000);
		} catch (InterruptedException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
	}
}
